package com.glor.operation.common.code;

import com.glor.operation.common.Response;

/**
 * Created by heylear.cai on 2016/2/18.
 */
public enum HttpCode implements Response {
    HTTP_OK(200, "Successful"),
    HTTP_NOT_FOUND(404, "没有找到该页面"),
    HTTP_NOT_SUPPORT(405, "不支持的请求方法"),
    HTTP_NOT_AVAILABLE(500, "服务暂时不可用，请稍候再试"),
    HTTP_NO_PERMISSION(403, "没有权限访问该资源，请与管理员联系");
    int code;
    String message;
    HttpCode(int code, String message){
        this.code = code;
        this.message = message;
    }
    @Override
    public String getMessage() {
        return message;
    }

    @Override
    public int getStatus() {
        return this.code;
    }
}
